<extend name="Public/base"/>

<block name="body">
    <!-- 标题栏 -->
    <div class="main-title">
        <h2>{$meta_title}</h2>
    </div>
    <div class="cf">
        <div class="fl">
            <a class="btn" href="{:U('addVideoTree', array('vc_id' => I('vc_id'), 'pid' => I('pid')))}">新 增</a>
            <if condition="I('vc_id') gt 0">
                <if condition="I('pid') gt 0">
                    <a class="btn" href="{:U('videoTreeList', array('vc_id' => I('vc_id')))}">返回上一级</a>
                    <else />
                    <a class="btn" href="{:U('videoList')}">返回上一级</a>
                </if>
            </if>
        </div>

    </div>
    <!-- 数据列表 -->
    <div class="data-table table-striped">
        <if condition="I('pid') gt 0">
            <!--  视频列表  -->
            <table>
                <thead>
                <tr>
                    <th>ID</th>
                    <th>名称</th>
                    <th>状态</th>
                    <th>观看时长</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <!--  视频列表  -->
                <notempty name="_list">
                    <volist name="_list" id="vo">
                        <tr>
                            <td>{$vo.id}</td>
                            <td>{$vo.name}</td>
                            <td><if condition="$vo['is_look'] == 0">不可试看<elseif condition="$vo['is_look'] == 1" />可试看<else />免费观看</if></td>
                            <td>{$vo.look_time}秒</td>
                            <td>
                                <a href="{:U('upVideoTree',array('id'=>$vo['id'],'vc_id'=>I('vc_id'),'pid'=>I('pid')))}" class="authorize">编辑</a> |
                                <a href="{:U('videoTreeExercisesList',array('id'=>$vo['id']))}" class="authorize">习题列表</a> |
                                <a href="{:U('delVideoTree',array('id'=>$vo['id']))}" class="authorize">删除</a>
                            </td>
                        </tr>
                    </volist>
                    <else/>
                    <td colspan="4" class="text-center"> aOh! 暂时还没有内容!</td>
                </notempty>
                </tbody>
            </table>
            <else />
            <!--  目录列表  -->
            <table>
                <thead>
                <tr>
                    <th>ID</th>
                    <th>目录名称</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <!--  视频列表  -->
                <notempty name="_list">
                    <volist name="_list" id="vo">
                        <tr>
                            <td>{$vo.id}</td>
                            <td>{$vo.name}</td>
                            <td>
                                <a href="{:U('upVideoTree',array('id'=>$vo['id'],'vc_id'=>I('vc_id')))}" class="authorize">编辑</a> |
                                <a href="{:U('videoTreeList',array('vc_id'=>I('vc_id'),'pid'=>$vo['id']))}" class="authorize">视频列表</a> |
                                <a href="{:U('delVideoTree',array('id'=>$vo['id']))}" class="authorize">删除</a>
                            </td>
                        </tr>
                    </volist>
                    <else/>
                    <td colspan="3" class="text-center"> aOh! 暂时还没有内容!</td>
                </notempty>
                </tbody>
            </table>
        </if>
    </div>
    <div class="page">
        {$_page}
    </div>
</block>

<block name="script">
    <script src="__STATIC__/thinkbox/jquery.thinkbox.js"></script>


    <script type="text/javascript">


        //导航高亮
        highlight_subnav('{:U("Manage/videoList")}');
    </script>
</block>